#include <stdio.h>

int main()

{
	int num,a,b,c;

scanf("%d",&num);
	
	a=num/100;
	b=num/10%10;
	c=num%10;
	
	num=c*100+b*10+a;
	
	printf("%d",num);
	
	return 0;
}
